package com.hutianao.gqgl.information.internationalQuote.control;

import com.hutianao.gqgl.information.internationalQuote.entity.SearchInternationalQuoteEntity;
import com.hutianao.gqgl.information.internationalQuote.service.InternationalQuoteService;
import com.hutianao.gqgl.mybatis.entity.InternationalQuoteEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PadingRstType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/information/internationalQuote")
public class InternationalQuoteController {

    private Logger logger = LogManager.getLogger(this.getClass());
    @Resource
    private InternationalQuoteService internationalQuoteService;

    @RequestMapping("/informationPage")
    public String informationPage(){
        return "information/internationalQuote/informationPage";
    }

    @RequestMapping("/queryInternationalQuoteInfoListByPage")
    @ResponseBody
    public PadingRstType<InternationalQuoteEntity> queryInternationalQuoteInfoListByPage(SearchInternationalQuoteEntity search, PaddingEntity padding){
        logger.info(search);
        logger.info(padding);
        PadingRstType<InternationalQuoteEntity> padingRstType = internationalQuoteService.queryInternationalQuoteInfoListByPage(search,padding);
        return padingRstType;
    }
}
